package com.test.service;


import com.test.entity.user;
import com.test.mapper.UserMapper;
import org.apache.tomcat.jni.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by 幻 on 2022/4/7.
 */

@Service
public class UserService {


    @Autowired
    private UserMapper userMapper;

    public User getUserInfo(int id){
        return userMapper.getUserInfo(id);
    }
    public int deleteById(int id){
        return userMapper.deleteById(id);
    }
    public int Update(User user){
        return userMapper.update(user);
    }
    public User save(User user){
        int save = userMapper.save(user);
        return user;
    }
    public List<user> findAll(){

        return userMapper.findAll();

    }
}
